<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            background-color: rebeccapurple;
        }
        .box2{
            background-color: green;
        }
    </style>
</head>
<body>
    <div id="app">
            <!-- <img v-bind:src="img2" alt="" srcset=""> -->
            <!-- 简写 -->
            <img :src="img2" :alt="alt" :title="title" >

            <div v-bind:class="style" >
                哈哈哈
            </div>
    </div>
</body>
<script src="./vue.min.js"></script>
<script>
    const vm = new Vue({
        el:"#app",
        data:{
            title:"一个美丽的图片",
            alt:"图片丢失了",
            style:"box2",
            img2:"https://dfzximg02.dftoutiao.com/news/20210914/20210914231432_8bcd33042f4815aa6fcb34f28db5a8d2_1_mwpm_03201609.jpeg",
            img:"https://dfzximg02.dftoutiao.com/news/20210914/20210914231436_d464f018dd9c7827bc0750850b380813_1_mwpm_03201609.jpeg"
        }
    })
</script>
</html>